package celiasoft.itasalib.query;

import celiasoft.itasalib.filegatherer.XMLGatherer;
import celiasoft.itasalib.query.resultparser.IQueryResultParser;
import celiasoft.itasalib.query.resultparser.QuerySingleUserResultParser;
import celiasoft.itasalib.staticdata.ItasaStaticUrls;

public class SingleUserQuery extends Query {

	private String _authcode;
	private int _id;

	public SingleUserQuery(XMLGatherer gatherer, String apikey) {
		super(gatherer, apikey);
	}

	@Override
	protected String getQueryUrl() {
		return String.format(ItasaStaticUrls.USERS_OTHER_SINGLE_URL, this._id, getAPIKey(), this._authcode);
	}

	@Override
	protected IQueryResultParser getResultParser() {
		
		return new QuerySingleUserResultParser();
	}

	public String getAuthcodeKey(){
		return this._authcode.toString();
	}
	
	public void setAuthcodeKey(String key){
		this._authcode = key.toString();
	}
	
	public int getUserId(){
		return this._id;
	}
	
	public void setUserId(int id){
		this._id = id;
	}
	
}
